val = GetTextFromUser(_('Enter a formatted screenname for %s.\n\nThe new screenname must be the same as the old one,\nexcept for changes in capitalization and spacing.') % oscar.username, caption = _('Edit Formatted Screenname'), default_value = oldval)
if val is None:
return None
continue
if val.lower().replace(' ', '') == oldval.lower().replace(' ', ''):
print 'setting new formatted name', val
return set(str(val))
continue
def set_account_email(oscar, set):
def show(email = (None, None)):
if not email:
pass
val = GetTextFromUser(_('Enter an email address:'), _('Edit Account Email: %s') % oscar.self_buddy.name, default_value = '')
if val is None or not val.strip():
return None
log.info('setting new account email %r', val)
return set(val)
timer = wx.PyTimer(show)
def success(email):
if timer.IsRunning():
timer.Stop()
show(email)
else:
log.info('server response was too late: %r', email)
def error():
log.info('error retreiving account email for %r', oscar)